3.2.100 \(\int \frac {\csc (c+d x)}{a+a \sin (c+d x)} \, dx\) [200]

Optimal. Leaf size=38 \[ -\frac {\tanh ^{-1}(\cos (c+d x))}{a d}+\frac {\cos (c+d x)}{d (a+a \sin (c+d x))} \]

[Out]

-arctanh(cos(d*x+c))/a/d+cos(d*x+c)/d/(a+a*sin(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {2826, 3855, 2727} \begin {gather*} \frac {\cos (c+d x)}{d (a \sin (c+d x)+a)}-\frac {\tanh ^{-1}(\cos (c+d x))}{a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]/(a + a*Sin[c + d*x]),x]

[Out]

-(ArcTanh[Cos[c + d*x]]/(a*d)) + Cos[c + d*x]/(d*(a + a*Sin[c + d*x]))

Rule 2727

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> Simp[-Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 2826

Int[1/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Dist[b/(
b*c - a*d), Int[1/(a + b*Sin[e + f*x]), x], x] - Dist[d/(b*c - a*d), Int[1/(c + d*Sin[e + f*x]), x], x] /; Fre
eQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\csc (c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {\int \csc (c+d x) \, dx}{a}-\int \frac {1}{a+a \sin (c+d x)} \, dx\\ &=-\frac {\tanh ^{-1}(\cos (c+d x))}{a d}+\frac {\cos (c+d x)}{d (a+a \sin (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 48, normalized size = 1.26 \begin {gather*} -\frac {\sec (c+d x) \left (-1+\tanh ^{-1}\left (\sqrt {\cos ^2(c+d x)}\right ) \sqrt {\cos ^2(c+d x)}+\sin (c+d x)\right )}{a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]/(a + a*Sin[c + d*x]),x]

[Out]

-((Sec[c + d*x]*(-1 + ArcTanh[Sqrt[Cos[c + d*x]^2]]*Sqrt[Cos[c + d*x]^2] + Sin[c + d*x]))/(a*d))

________________________________________________________________________________________

Maple [A]
time = 0.08, size = 34, normalized size = 0.89

method result size
derivativedivides \(\frac {\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) \(34\)
default \(\frac {\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) \(34\)
norman \(-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}\) \(49\)
risch \(\frac {2}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d a}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d a}\) \(63\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d/a*(2/(tan(1/2*d*x+1/2*c)+1)+ln(tan(1/2*d*x+1/2*c)))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 51, normalized size = 1.34 \begin {gather*} \frac {\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac {2}{a + \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

(log(sin(d*x + c)/(cos(d*x + c) + 1))/a + 2/(a + a*sin(d*x + c)/(cos(d*x + c) + 1)))/d

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 97 vs. \(2 (38) = 76\).
time = 0.34, size = 97, normalized size = 2.55 \begin {gather*} -\frac {{\left (\cos \left (d x + c\right ) + \sin \left (d x + c\right ) + 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (\cos \left (d x + c\right ) + \sin \left (d x + c\right ) + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2 \, \cos \left (d x + c\right ) + 2 \, \sin \left (d x + c\right ) - 2}{2 \, {\left (a d \cos \left (d x + c\right ) + a d \sin \left (d x + c\right ) + a d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

-1/2*((cos(d*x + c) + sin(d*x + c) + 1)*log(1/2*cos(d*x + c) + 1/2) - (cos(d*x + c) + sin(d*x + c) + 1)*log(-1
/2*cos(d*x + c) + 1/2) - 2*cos(d*x + c) + 2*sin(d*x + c) - 2)/(a*d*cos(d*x + c) + a*d*sin(d*x + c) + a*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\csc {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a+a*sin(d*x+c)),x)

[Out]

Integral(csc(c + d*x)/(sin(c + d*x) + 1), x)/a

________________________________________________________________________________________

Giac [A]
time = 6.06, size = 38, normalized size = 1.00 \begin {gather*} \frac {\frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a} + \frac {2}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

(log(abs(tan(1/2*d*x + 1/2*c)))/a + 2/(a*(tan(1/2*d*x + 1/2*c) + 1)))/d

________________________________________________________________________________________

Mupad [B]
time = 1.21, size = 39, normalized size = 1.03 \begin {gather*} \frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}+\frac {2}{a\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(c + d*x)*(a + a*sin(c + d*x))),x)

[Out]

log(tan(c/2 + (d*x)/2))/(a*d) + 2/(a*d*(tan(c/2 + (d*x)/2) + 1))

________________________________________________________________________________________